\(\int \frac {1}{(c g+d g x)^3 (A+B \log (e (\frac {a+b x}{c+d x})^n))^2} \, dx\) [56]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 35, antiderivative size = 256 \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\frac {b e^{-\frac {A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)}-\frac {2 d e^{-\frac {2 A}{B n}} (a+b x)^2 \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)^2}-\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]

[Out]

b*(b*x+a)*Ei((A+B*ln(e*((b*x+a)/(d*x+c))^n))/B/n)/B^2/(-a*d+b*c)^2/exp(A/B/n)/g^3/n^2/((e*((b*x+a)/(d*x+c))^n)
^(1/n))/(d*x+c)-2*d*(b*x+a)^2*Ei(2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/B/n)/B^2/(-a*d+b*c)^2/exp(2*A/B/n)/g^3/n^2/
((e*((b*x+a)/(d*x+c))^n)^(2/n))/(d*x+c)^2+(-b*x-a)/B/(-a*d+b*c)/g^3/n/(d*x+c)^2/(A+B*ln(e*((b*x+a)/(d*x+c))^n)
)

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {2551, 2357, 2367, 2337, 2209, 2347} \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {2 d (a+b x)^2 e^{-\frac {2 A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 g^3 n^2 (c+d x)^2 (b c-a d)^2}+\frac {b (a+b x) e^{-\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 g^3 n^2 (c+d x) (b c-a d)^2}-\frac {a+b x}{B g^3 n (c+d x)^2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )} \]

[In]

Int[1/((c*g + d*g*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2),x]

[Out]

(b*(a + b*x)*ExpIntegralEi[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(B*n)])/(B^2*(b*c - a*d)^2*E^(A/(B*n))*g^3*n
^2*(e*((a + b*x)/(c + d*x))^n)^n^(-1)*(c + d*x)) - (2*d*(a + b*x)^2*ExpIntegralEi[(2*(A + B*Log[e*((a + b*x)/(
c + d*x))^n]))/(B*n)])/(B^2*(b*c - a*d)^2*E^((2*A)/(B*n))*g^3*n^2*(e*((a + b*x)/(c + d*x))^n)^(2/n)*(c + d*x)^
2) - (a + b*x)/(B*(b*c - a*d)*g^3*n*(c + d*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[x*(d + e*x)^q*((a
+ b*Log[c*x^n])^(p + 1)/(b*n*(p + 1))), x] + (-Dist[(q + 1)/(b*n*(p + 1)), Int[(d + e*x)^q*(a + b*Log[c*x^n])^
(p + 1), x], x] + Dist[d*(q/(b*n*(p + 1))), Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^(p + 1), x], x]) /; FreeQ
[{a, b, c, d, e, n}, x] && LtQ[p, -1] && GtQ[q, 0]

Rule 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2551

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.), x_Symbol] :> Dist[(b*c - a*d)^(m + 1)*(g/d)^m, Subst[Int[(A + B*Log[e*x^n])^p/(b - d*x)^(m + 2), x], x, (
a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c - a*d, 0] && IntegersQ[m, p] &&
 EqQ[d*f - c*g, 0] && (GtQ[p, 0] || LtQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {b-d x}{\left (A+B \log \left (e x^n\right )\right )^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g^3} \\ & = -\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}+\frac {2 \text {Subst}\left (\int \frac {b-d x}{A+B \log \left (e x^n\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n}-\frac {b \text {Subst}\left (\int \frac {1}{A+B \log \left (e x^n\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n} \\ & = -\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}+\frac {2 \text {Subst}\left (\int \left (\frac {b}{A+B \log \left (e x^n\right )}-\frac {d x}{A+B \log \left (e x^n\right )}\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n}-\frac {\left (b (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{A+B x} \, dx,x,\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d)^2 g^3 n^2 (c+d x)} \\ & = -\frac {b e^{-\frac {A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \text {Ei}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)}-\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}+\frac {(2 b) \text {Subst}\left (\int \frac {1}{A+B \log \left (e x^n\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n}-\frac {(2 d) \text {Subst}\left (\int \frac {x}{A+B \log \left (e x^n\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n} \\ & = -\frac {b e^{-\frac {A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \text {Ei}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)}-\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {\left (2 d (a+b x)^2 \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{A+B x} \, dx,x,\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d)^2 g^3 n^2 (c+d x)^2}+\frac {\left (2 b (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{A+B x} \, dx,x,\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d)^2 g^3 n^2 (c+d x)} \\ & = \frac {b e^{-\frac {A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \text {Ei}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)}-\frac {2 d e^{-\frac {2 A}{B n}} (a+b x)^2 \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)^2}-\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.35 (sec) , antiderivative size = 288, normalized size of antiderivative = 1.12 \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\frac {e^{-\frac {2 A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \left (-B (b c-a d) e^{\frac {2 A}{B n}} n \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n}+b e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x) \operatorname {ExpIntegralEi}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 d (a+b x) \operatorname {ExpIntegralEi}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]

[In]

Integrate[1/((c*g + d*g*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2),x]

[Out]

((a + b*x)*(-(B*(b*c - a*d)*E^((2*A)/(B*n))*n*(e*((a + b*x)/(c + d*x))^n)^(2/n)) + b*E^(A/(B*n))*(e*((a + b*x)
/(c + d*x))^n)^n^(-1)*(c + d*x)*ExpIntegralEi[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(B*n)]*(A + B*Log[e*((a +
 b*x)/(c + d*x))^n]) - 2*d*(a + b*x)*ExpIntegralEi[(2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(B*n)]*(A + B*Lo
g[e*((a + b*x)/(c + d*x))^n])))/(B^2*(b*c - a*d)^2*E^((2*A)/(B*n))*g^3*n^2*(e*((a + b*x)/(c + d*x))^n)^(2/n)*(
c + d*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))

Maple [F]

\[\int \frac {1}{\left (d g x +c g \right )^{3} {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}d x\]

[In]

int(1/(d*g*x+c*g)^3/(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

[Out]

int(1/(d*g*x+c*g)^3/(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 770 vs. \(2 (256) = 512\).

Time = 0.28 (sec) , antiderivative size = 770, normalized size of antiderivative = 3.01 \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\frac {{\left ({\left (A b d^{2} x^{2} + 2 \, A b c d x + A b c^{2} + {\left (B b d^{2} x^{2} + 2 \, B b c d x + B b c^{2}\right )} \log \left (e\right ) + {\left (B b d^{2} n x^{2} + 2 \, B b c d n x + B b c^{2} n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} e^{\left (\frac {B \log \left (e\right ) + A}{B n}\right )} \operatorname {log\_integral}\left (\frac {{\left (b x + a\right )} e^{\left (\frac {B \log \left (e\right ) + A}{B n}\right )}}{d x + c}\right ) - {\left ({\left (B b^{2} c - B a b d\right )} n x + {\left (B a b c - B a^{2} d\right )} n\right )} e^{\left (\frac {2 \, {\left (B \log \left (e\right ) + A\right )}}{B n}\right )} - 2 \, {\left (A d^{3} x^{2} + 2 \, A c d^{2} x + A c^{2} d + {\left (B d^{3} x^{2} + 2 \, B c d^{2} x + B c^{2} d\right )} \log \left (e\right ) + {\left (B d^{3} n x^{2} + 2 \, B c d^{2} n x + B c^{2} d n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \operatorname {log\_integral}\left (\frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} e^{\left (\frac {2 \, {\left (B \log \left (e\right ) + A\right )}}{B n}\right )}}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )\right )} e^{\left (-\frac {2 \, {\left (B \log \left (e\right ) + A\right )}}{B n}\right )}}{{\left (A B^{2} b^{2} c^{2} d^{2} - 2 \, A B^{2} a b c d^{3} + A B^{2} a^{2} d^{4}\right )} g^{3} n^{2} x^{2} + 2 \, {\left (A B^{2} b^{2} c^{3} d - 2 \, A B^{2} a b c^{2} d^{2} + A B^{2} a^{2} c d^{3}\right )} g^{3} n^{2} x + {\left (A B^{2} b^{2} c^{4} - 2 \, A B^{2} a b c^{3} d + A B^{2} a^{2} c^{2} d^{2}\right )} g^{3} n^{2} + {\left ({\left (B^{3} b^{2} c^{2} d^{2} - 2 \, B^{3} a b c d^{3} + B^{3} a^{2} d^{4}\right )} g^{3} n^{2} x^{2} + 2 \, {\left (B^{3} b^{2} c^{3} d - 2 \, B^{3} a b c^{2} d^{2} + B^{3} a^{2} c d^{3}\right )} g^{3} n^{2} x + {\left (B^{3} b^{2} c^{4} - 2 \, B^{3} a b c^{3} d + B^{3} a^{2} c^{2} d^{2}\right )} g^{3} n^{2}\right )} \log \left (e\right ) + {\left ({\left (B^{3} b^{2} c^{2} d^{2} - 2 \, B^{3} a b c d^{3} + B^{3} a^{2} d^{4}\right )} g^{3} n^{3} x^{2} + 2 \, {\left (B^{3} b^{2} c^{3} d - 2 \, B^{3} a b c^{2} d^{2} + B^{3} a^{2} c d^{3}\right )} g^{3} n^{3} x + {\left (B^{3} b^{2} c^{4} - 2 \, B^{3} a b c^{3} d + B^{3} a^{2} c^{2} d^{2}\right )} g^{3} n^{3}\right )} \log \left (\frac {b x + a}{d x + c}\right )} \]

[In]

integrate(1/(d*g*x+c*g)^3/(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="fricas")

[Out]

((A*b*d^2*x^2 + 2*A*b*c*d*x + A*b*c^2 + (B*b*d^2*x^2 + 2*B*b*c*d*x + B*b*c^2)*log(e) + (B*b*d^2*n*x^2 + 2*B*b*
c*d*n*x + B*b*c^2*n)*log((b*x + a)/(d*x + c)))*e^((B*log(e) + A)/(B*n))*log_integral((b*x + a)*e^((B*log(e) +
A)/(B*n))/(d*x + c)) - ((B*b^2*c - B*a*b*d)*n*x + (B*a*b*c - B*a^2*d)*n)*e^(2*(B*log(e) + A)/(B*n)) - 2*(A*d^3
*x^2 + 2*A*c*d^2*x + A*c^2*d + (B*d^3*x^2 + 2*B*c*d^2*x + B*c^2*d)*log(e) + (B*d^3*n*x^2 + 2*B*c*d^2*n*x + B*c
^2*d*n)*log((b*x + a)/(d*x + c)))*log_integral((b^2*x^2 + 2*a*b*x + a^2)*e^(2*(B*log(e) + A)/(B*n))/(d^2*x^2 +
 2*c*d*x + c^2)))*e^(-2*(B*log(e) + A)/(B*n))/((A*B^2*b^2*c^2*d^2 - 2*A*B^2*a*b*c*d^3 + A*B^2*a^2*d^4)*g^3*n^2
*x^2 + 2*(A*B^2*b^2*c^3*d - 2*A*B^2*a*b*c^2*d^2 + A*B^2*a^2*c*d^3)*g^3*n^2*x + (A*B^2*b^2*c^4 - 2*A*B^2*a*b*c^
3*d + A*B^2*a^2*c^2*d^2)*g^3*n^2 + ((B^3*b^2*c^2*d^2 - 2*B^3*a*b*c*d^3 + B^3*a^2*d^4)*g^3*n^2*x^2 + 2*(B^3*b^2
*c^3*d - 2*B^3*a*b*c^2*d^2 + B^3*a^2*c*d^3)*g^3*n^2*x + (B^3*b^2*c^4 - 2*B^3*a*b*c^3*d + B^3*a^2*c^2*d^2)*g^3*
n^2)*log(e) + ((B^3*b^2*c^2*d^2 - 2*B^3*a*b*c*d^3 + B^3*a^2*d^4)*g^3*n^3*x^2 + 2*(B^3*b^2*c^3*d - 2*B^3*a*b*c^
2*d^2 + B^3*a^2*c*d^3)*g^3*n^3*x + (B^3*b^2*c^4 - 2*B^3*a*b*c^3*d + B^3*a^2*c^2*d^2)*g^3*n^3)*log((b*x + a)/(d
*x + c)))

Sympy [F(-1)]

Timed out. \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\text {Timed out} \]

[In]

integrate(1/(d*g*x+c*g)**3/(A+B*ln(e*((b*x+a)/(d*x+c))**n))**2,x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int { \frac {1}{{\left (d g x + c g\right )}^{3} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}} \,d x } \]

[In]

integrate(1/(d*g*x+c*g)^3/(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="maxima")

[Out]

-(b*x + a)/((b*c^3*g^3*n - a*c^2*d*g^3*n)*A*B + (b*c^3*g^3*n*log(e) - a*c^2*d*g^3*n*log(e))*B^2 + ((b*c*d^2*g^
3*n - a*d^3*g^3*n)*A*B + (b*c*d^2*g^3*n*log(e) - a*d^3*g^3*n*log(e))*B^2)*x^2 + 2*((b*c^2*d*g^3*n - a*c*d^2*g^
3*n)*A*B + (b*c^2*d*g^3*n*log(e) - a*c*d^2*g^3*n*log(e))*B^2)*x + ((b*c*d^2*g^3*n - a*d^3*g^3*n)*B^2*x^2 + 2*(
b*c^2*d*g^3*n - a*c*d^2*g^3*n)*B^2*x + (b*c^3*g^3*n - a*c^2*d*g^3*n)*B^2)*log((b*x + a)^n) - ((b*c*d^2*g^3*n -
 a*d^3*g^3*n)*B^2*x^2 + 2*(b*c^2*d*g^3*n - a*c*d^2*g^3*n)*B^2*x + (b*c^3*g^3*n - a*c^2*d*g^3*n)*B^2)*log((d*x
+ c)^n)) - integrate((b*d*x - b*c + 2*a*d)/(((b*c*d^3*g^3*n - a*d^4*g^3*n)*A*B + (b*c*d^3*g^3*n*log(e) - a*d^4
*g^3*n*log(e))*B^2)*x^3 + (b*c^4*g^3*n - a*c^3*d*g^3*n)*A*B + (b*c^4*g^3*n*log(e) - a*c^3*d*g^3*n*log(e))*B^2
+ 3*((b*c^2*d^2*g^3*n - a*c*d^3*g^3*n)*A*B + (b*c^2*d^2*g^3*n*log(e) - a*c*d^3*g^3*n*log(e))*B^2)*x^2 + 3*((b*
c^3*d*g^3*n - a*c^2*d^2*g^3*n)*A*B + (b*c^3*d*g^3*n*log(e) - a*c^2*d^2*g^3*n*log(e))*B^2)*x + ((b*c*d^3*g^3*n
- a*d^4*g^3*n)*B^2*x^3 + 3*(b*c^2*d^2*g^3*n - a*c*d^3*g^3*n)*B^2*x^2 + 3*(b*c^3*d*g^3*n - a*c^2*d^2*g^3*n)*B^2
*x + (b*c^4*g^3*n - a*c^3*d*g^3*n)*B^2)*log((b*x + a)^n) - ((b*c*d^3*g^3*n - a*d^4*g^3*n)*B^2*x^3 + 3*(b*c^2*d
^2*g^3*n - a*c*d^3*g^3*n)*B^2*x^2 + 3*(b*c^3*d*g^3*n - a*c^2*d^2*g^3*n)*B^2*x + (b*c^4*g^3*n - a*c^3*d*g^3*n)*
B^2)*log((d*x + c)^n)), x)

Giac [A] (verification not implemented)

none

Time = 0.42 (sec) , antiderivative size = 325, normalized size of antiderivative = 1.27 \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx={\left (\frac {b {\rm Ei}\left (\frac {\log \left (e\right )}{n} + \frac {A}{B n} + \log \left (\frac {b x + a}{d x + c}\right )\right ) e^{\left (-\frac {A}{B n}\right )}}{{\left (B^{2} b c g^{3} n^{2} - B^{2} a d g^{3} n^{2}\right )} e^{\left (\frac {1}{n}\right )}} - \frac {2 \, d {\rm Ei}\left (\frac {2 \, \log \left (e\right )}{n} + \frac {2 \, A}{B n} + 2 \, \log \left (\frac {b x + a}{d x + c}\right )\right ) e^{\left (-\frac {2 \, A}{B n}\right )}}{{\left (B^{2} b c g^{3} n^{2} - B^{2} a d g^{3} n^{2}\right )} e^{\frac {2}{n}}} - \frac {\frac {{\left (b x + a\right )} b}{d x + c} - \frac {{\left (b x + a\right )}^{2} d}{{\left (d x + c\right )}^{2}}}{B^{2} b c g^{3} n^{2} \log \left (\frac {b x + a}{d x + c}\right ) - B^{2} a d g^{3} n^{2} \log \left (\frac {b x + a}{d x + c}\right ) + B^{2} b c g^{3} n \log \left (e\right ) - B^{2} a d g^{3} n \log \left (e\right ) + A B b c g^{3} n - A B a d g^{3} n}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \]

[In]

integrate(1/(d*g*x+c*g)^3/(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="giac")

[Out]

(b*Ei(log(e)/n + A/(B*n) + log((b*x + a)/(d*x + c)))*e^(-A/(B*n))/((B^2*b*c*g^3*n^2 - B^2*a*d*g^3*n^2)*e^(1/n)
) - 2*d*Ei(2*log(e)/n + 2*A/(B*n) + 2*log((b*x + a)/(d*x + c)))*e^(-2*A/(B*n))/((B^2*b*c*g^3*n^2 - B^2*a*d*g^3
*n^2)*e^(2/n)) - ((b*x + a)*b/(d*x + c) - (b*x + a)^2*d/(d*x + c)^2)/(B^2*b*c*g^3*n^2*log((b*x + a)/(d*x + c))
 - B^2*a*d*g^3*n^2*log((b*x + a)/(d*x + c)) + B^2*b*c*g^3*n*log(e) - B^2*a*d*g^3*n*log(e) + A*B*b*c*g^3*n - A*
B*a*d*g^3*n))*(b*c/(b*c - a*d)^2 - a*d/(b*c - a*d)^2)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int \frac {1}{{\left (c\,g+d\,g\,x\right )}^3\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2} \,d x \]

[In]

int(1/((c*g + d*g*x)^3*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2),x)

[Out]

int(1/((c*g + d*g*x)^3*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2), x)